import { defHttp } from '@/utils/http/axios';

const baseUrl = '/sources';

enum Api {
  searchSources = `${baseUrl}/searchSources`,
  createSources = `${baseUrl}/createSources`,
  deleteSources = `${baseUrl}/deleteSources`,
  updateSources = `${baseUrl}/updateSources`,
}

// 查询所有
export const getSearchSources = (params?: Recordable) =>
  defHttp.post({ url: Api.searchSources, params });
// 创建
export const createSources = (params?: Recordable) =>
  defHttp.post({ url: Api.createSources, params });
// 删除
export const deleteSources = (params?: Recordable) =>
  defHttp.post({ url: Api.deleteSources, params });
// 修改
export const updateSources = (params?: Recordable) =>
  defHttp.post({ url: Api.updateSources, params });
